<template>
	<view class="main">
		<topCommonTitleBar class="topBar" :statePerch="true" arrow="white" :isBackClick="false" @backClick="goBack" positionType="fixed">
		</topCommonTitleBar>
		<view class="top_content">
			<image class="header_img"
				src="https://xzcs-public-files.oss-cn-beijing.aliyuncs.com/static/enterprise-service/serviceImg/serviceDetailBg.png"
				mode="scaleToFill" />
			<view class="info">
				<image class="logo" :src="serviceInfo.logo" mode="scaleToFill" />
				<view class="title">{{ serviceInfo.name }}</view>
				<view class="tags">
					<view class="tag">{{ getServiceType(serviceInfo.type) }}</view>
					<view class="tag">保证金{{ serviceInfo.cash_deposit }}</view>
				</view>
				<view class="address">地址：{{ serviceInfo.city }}</view>
			</view>
		</view>

		<view class="subTitle">服务介绍</view>
		<view class="service">
			<view class="shop_list">
				<view class="shop_item" v-for="(item, index) in serviceShopList" :key="index">
					<image class="shop_img" :src="item.pic[0]" mode="scaleToFill" />
					<view class="shop_right">
						<view class="shop_name">{{ item.name }}</view>
						<view class="shop_price">{{ item.price == 0 ? '面议' : '¥' + item.price }}</view>
					</view>
				</view>
			</view>
		</view>

		<view class="tel" @click="telPhone(serviceInfo.tel)"></view>
	</view>
</template>

<script type="text/javascript" src="plus-confusion://../pages/servicePro/serviceInfo.js"></script>

<style lang="scss" scoped>
.main {
	min-height: 100vh;

	.topBar{
		position: fixed;
		width: 100vw;
		z-index: 99999;
		background-color: rgba(0, 0, 0, 0) !important;
	}
	.top_content {
		position: relative;
		height: 496rpx;
		width: 100vw;


		.header_img {
			position: absolute;
			top: 0;
			left: 0;
			display: inline-block;
			width: 750rpx;
			height: 496rpx;
		}

		.info {
			width: 100%;
			color: #fff;
			position: absolute;
			top: 55%;
			left: 50%;
			transform: translate(-50%, -50%);
			display: flex;
			align-items: center;
			flex-direction: column;
			justify-content: center;

			.logo {
				width: 120rpx;
				height: 120rpx;
				border-radius: 50%;
			}

			.title {
				margin-top: 21rpx;
				text-align: center;
				font-size: 36rpx;
				font-weight: 600;
				color: #FFFFFF;
			}

			.tags {
				margin-top: 14rpx;
				display: flex;
				align-items: center;



				.tag {
					padding: 10rpx;
					border: 1rpx solid #FFFFFF;
					font-size: 22rpx;
					color: #FFFFFF;
					border-radius: 4rpx;

					&:first-child {
						margin-right: 23rpx;
					}
				}
			}

			.address {
				margin-top: 25rpx;
				font-size: 24rpx;
				color: #6A85A4;
				line-height: 34rpx;
			}
		}
	}

	.subTitle {
		padding: 46rpx 0 25rpx 30rpx;
		font-size: 30rpx;
		font-weight: 600;
		color: #333333;
		line-height: 42rpx;
		border-bottom: 1rpx solid #dfdfdf;
	}

	.service {
		padding: 0 30rpx;
		margin-top: 44rpx;

		.shop_list {
			.shop_item {
				display: flex;
				align-items: center;
				height: 160rpx;
				margin-bottom: 44rpx;

				.shop_img {
					width: 160rpx;
					height: 160rpx;
					border-radius: 10rpx;
					margin-right: 30rpx;
				}

				.shop_right {
					width: calc(100% - 190rpx);
					height: 100%;
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.shop_name {
						font-size: 32rpx;
						font-weight: 600;
						color: #333333;
						line-height: 38rpx;
					}

					.shop_price {
						font-size: 30rpx;
						color: #666666;
						line-height: 35rpx;
					}
				}
			}
		}
	}

	.tel {
		width: 130rpx;
		height: 130rpx;
		position: fixed;
		bottom: 45rpx;
		right: 53rpx;
		background-image: url('@/static/img/servicePro/tel_icon.png');
		background-size: 100% 100%;
		background-repeat: no-repeat;
		background-position: center;
	}
}
</style>
